from selenium import webdriver
from time import sleep
from selenium.webdriver.common.by import By
driver=webdriver.Firefox()
driver.get('file:///E:/%E8%93%AC%E8%8E%B1%E5%B0%8F%E8%AF%BE2024%E6%B5%8B%E8%AF%95/%E7%AC%AC%E5%9B%9B%E9%98%B6%E6%AE%B5/Selenium%E8%87%AA%E5%8A%A8%E5%8C%96/selenium_demo/day02demo/message.html')
#myname=driver.find_element_by_id('un')
myname=driver.find_element(By.ID,'un')
myname.send_keys('liming')
sleep(2)
mypassword=driver.find_element(By.ID,'pw')
#mypassword=driver.find_element_by_id('pw')
mypassword.send_keys('123456')
sleep(2)
mybutton=driver.find_element(By.ID,'sub')
#mybutton=driver.find_element_by_id('sub')
mybutton.click()
sleep(2)
driver.quit()